#include <my_header.h>
#include "task_queue.h"
#include "worker.h"
#include "log.h"
#include "server_sql_func.h"
#include "login_regsiter.h"


extern int global_thread_num;
extern int global_server_log_fd;
extern char global_ip[20];
extern char global_port[20];


typedef struct{
    int exit_flag;
    pthread_t *tid_arr;
    task_queue_t task_queue;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
}pthread_pool_t;

//配置文件初始化
int config_init();

//线程池初始化
int pthread_pool_init(pthread_pool_t *pool);

//线程主函数
void *pthread_main(void *arg);

//网络初始化
int tcp_init(int *ser_fd);

//监听加入
int epoll_add_new_fd(int ep_fd,int add_fd);

//线程池清理函数
int pthread_pool_clear(pthread_pool_t *pool);




